#pragma once
#include "PropertiesWnd.h"
#include "ROIDlg.h"
#include "boost\array.hpp"

class CROIToolBar : public CPropertiesToolBar
{
public:
  CMFCColorMenuButton* CreateColorButton(void);

protected:
  CPalette	m_palColorPicker;	// Palette for color picker
  int			  m_nNumColours;

  // Implementation
protected:
  virtual void OnReset(void);
};


// CROIPane

class CROIPane : public CDockablePane
{
	DECLARE_DYNAMIC(CROIPane)

public:
	CROIPane();
	virtual ~CROIPane();

public:
  boost::signals2::signal<void (const draw_obj::style& objstyle)> StyleChanged;
  void AdjustLayout(void);
  void ClearAllTracker(void);
  void ChangeName(DWORD data, const tstring& newName) { m_wndROI.ChangeName(data, newName); }
  void StationSwitch_slot(CMeasureStation* station);
  void RoleSwitch_slot(int role);
  void StyleChanged_clot(const draw_obj::style& objstyle);

protected:
	DECLARE_MESSAGE_MAP()

public:
  afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  afx_msg void OnSize(UINT nType, int cx, int cy);
  afx_msg void OnSetFocus(CWnd* pOldWnd);
  afx_msg void OnDrawSegment();
  afx_msg void OnUpdateDrawSegment(CCmdUI* pCmdUI);
  afx_msg void OnDrawBox();
  afx_msg void OnUpdateDrawBox(CCmdUI* pCmdUI);
  afx_msg void OnDrawAngleBox();
  afx_msg void OnUpdateDrawAngleBox(CCmdUI* pCmdUI);
  afx_msg void OnDrawRing();
  afx_msg void OnUpdateDrawRing(CCmdUI* pCmdUI);
  afx_msg void OnDrawArc();
  afx_msg void OnUpdateDrawArc(CCmdUI* pCmdUI);
  afx_msg void OnDrawAnnulus();
  afx_msg void OnUpdateDrawAnnulus(CCmdUI* pCmdUI);
  afx_msg void OnDrawAnnulusArc();
  afx_msg void OnUpdateDrawAnnulusArc(CCmdUI* pCmdUI);
  afx_msg void OnDrawPolygon();
  afx_msg void OnUpdateDrawPolygon(CCmdUI* pCmdUI);
  afx_msg void OnDeleteDrawObjs();
  afx_msg void OnUpdateDeleteDrawObjs(CCmdUI* pCmdUI);
  afx_msg void OnDeleteAllDrawObjs();
  afx_msg void OnUpdateDeleteAllDrawObjs(CCmdUI* pCmdUI);
  afx_msg void OnBorderColor();
  afx_msg void OnUpdateBorderColor(CCmdUI* pCmdUI);

protected:
  CROIToolBar       m_wndToolBar;
  CROIDlg           m_wndROI;
  CMeasureStation*  station_;
  boost::array<int, kDrawShapeButt> enables_;
};


